package org.springblade.modules.platform.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
public class    MeasuringChainTableVO {

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 部门类型
     */
    @ApiModelProperty(value = "部门类型")
    private Integer chainCategory;

    /**
     * 部门名
     */
    @ApiModelProperty(value = "部门名")
    private String chainName;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer sort;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 父主键
     */
    @ApiModelProperty(value = "父主键")
    private Long parentId;


    @ApiModelProperty(value = "类型是公司")
    private MeasuringCompanyInfoVO measuringCompanyInfoVO;


    @ApiModelProperty(value = "类型是测量量")
    private MeasuringChainInfoVO measuringChainInfoVO;


    @NoArgsConstructor
    @Data
    public static class MeasuringCompanyInfoVO {
        private Long id;

        /**
         * 单位类型
         */
        @ApiModelProperty(value = "单位类型")
        private Integer companyTypeCode;

        /**
         * 单位类型名称
         */
        @ApiModelProperty(value = "单位类型名称")
        private String companyTypeName;

        /**
         * 位置
         */
        @ApiModelProperty(value = "位置")
        private String position;

    }





    @NoArgsConstructor
    @Data
    public static class MeasuringChainInfoVO {

        @ApiModelProperty(value = "主键")
        private Long id;
        /**
         * 是否开启自检
         */
        @ApiModelProperty(value = "是否开启自检")
        private Boolean isSelf;

        /**
         * 是否开启光源
         */
        @ApiModelProperty(value = "是否开启光源")
        private Boolean isLightSource;

        /**
         * 间隔时间
         */
        @ApiModelProperty(value = "间隔时间")
        private Long intervalTime;

        /**
         * 部门编号
         */
        @ApiModelProperty(value = "测量连编号")
        private Long measuringChainId;

        @ApiModelProperty(value = "真空泵")
        private String vacuumPumpId;

        @ApiModelProperty(value = "气压值")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Integer pressure;

        @ApiModelProperty(value = "范围")
        @JsonSerialize(nullsUsing = NullSerializer.class)
        private Integer pressureScope;

    }

}
